package com.bbzn.device.client.service;

import com.aliyuncs.facebody.model.v20191230.*;
import com.bbzn.device.client.vo.req.FaceEntityVO;
import com.bbzn.device.client.vo.req.FaceVO;
import com.bbzn.device.client.dataobject.Face;
import com.bbzn.device.client.dto.face.FaceDTO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @Author jianghongyuan
 * @Date 2021/9/22 10:36
 * @Version 1.0
 */
public interface FaceService {

    int deleteByPrimaryKey(Long id);

    int insert(Face record);

    int insertOrUpdate(Face record);

    int insertOrUpdateSelective(Face record);

    int insertSelective(Face record);

    Face selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Face record);

    int updateByPrimaryKey(Face record);

    List<Face> findByAll(Face face);

    int updateBatch(List<Face> list);

    int updateBatchSelective(List<Face> list);

    int batchInsert(List<Face> list);

    List<FaceDTO> findAllJoinUser(Face face);



    /**
     * 查看人脸库列表
     *
     * @param language 语言
     * @return
     * @throws Exception
     */
    ListFaceDbsResponse getListFaceDbs(String language) throws Exception;

    /**
     * 创建人脸库
     *
     * @param name     数据库名称
     * @param language 语言
     * @return
     * @throws Exception
     */
    void addFaceDb(Long userId, String name, String language) throws Exception;

    /**
     * 删除人脸库
     *
     * @param name     数据库名称
     * @param language 语言
     * @throws Exception
     */
    void deleteFaceDb(String name, String language) throws Exception;

    /**
     * 查询人脸样本列表
     *
     * @param reqVO
     * @param language 语言
     * @return
     * @throws Exception
     */
    ListFaceEntitiesResponse getListFaceEntities(FaceEntityVO reqVO, String language) throws Exception;

    /**
     * 查询人脸样本
     *
     * @param reqVO
     * @param language 语言
     * @return
     * @throws Exception
     */
    GetFaceEntityResponse getFaceEntity(FaceEntityVO reqVO, String language) throws Exception;

    /**
     * 创建人脸样本
     *
     * @param reqVO
     * @param language 语言
     * @throws Exception
     */
    void addFaceEntity(FaceEntityVO reqVO, String language) throws Exception;

    /**
     * 更新人脸样本
     *
     * @param reqVO
     * @param language 语言
     * @throws Exception
     */
    void updateFaceEntity(FaceEntityVO reqVO, String language) throws Exception;

    /**
     * 删除人脸样本
     *
     * @param reqVO
     * @param language 语言
     * @throws Exception
     */
    void deleteFaceEntity(FaceEntityVO reqVO, String language) throws Exception;

    /**
     * 上传人脸照片
     * @param file
     * @return
     * @throws Exception
     */
    String uploadFaceImg(MultipartFile file) throws Exception;

    /**
     * 删除人脸照片
     * @param list
     * @return
     * @throws Exception
     */
    List delListImg(List<String> list) throws Exception;

    /**
     * 创建人脸样本
     *
     * @param reqVO
     * @param language 语言
     * @throws Exception
     */
    void addFace(FaceVO reqVO, String userName, String language) throws Exception;

    /**
     * 批量添加人脸数据
     *
     * @param reqVO
     * @param language 语言
     * @throws Exception
     */
    void batchAddFaces(FaceVO reqVO, String language) throws Exception;

    /**
     * 搜索人脸
     *
     * @param reqVO
     * @param language 语言
     * @throws Exception
     */
    SearchFaceResponse searchFace(FaceVO reqVO, String language) throws Exception;

    /**
     * 删除人脸
     *
     * @param reqVO
     * @param language 语言
     * @throws Exception
     */
    void deleteFace(FaceVO reqVO, String language) throws Exception;
}



